import axios from './axios'

/**
 * 设备数据
 */
//设备数据列表数量统计(v1)
export function getMachNumStat_v1(params) {
    const url = '/ms/api/v1/mach/numStat'
    return axios.get(url, params)
}
//多台设备-gps轨迹
export function getMachAllGpsList(params) {
    const url = '/ms/api/v1/mach/all/gps/list'
    return axios.get(url, params)
}
// 获取首页设备类型
export function getMachTypelist(params) {
    const url = '/ms/api/v1/mach/option/machTypeList'
    return axios.get(url, params)
}
//获取设备二维码地址
export function getMachQr_V1(params) {
    const url = '/ms/api/v1/mach/getMachQr'
    return axios.get(url, params)
}
// 查询设备分类
export function getMachClassifyList_V1(params) {
    const url = '/ms/api/v1/sys/mach/type/classify/list'
    return axios.get(url, params)
}
//添加设备分类
export function getMachClassifyAdd_V1(params) {
    const url = '/ms/api/v1/sys/mach/type/classify/add'
    return axios.post(url, params)
}
//编辑设备类型
export function getMachClassifyEdit_V1(params) {
    const url = '/ms/api/v1/sys/mach/type/classify/edit'
    return axios.post(url, params)
}
// 查询设备类型
export function getMachTypeList_V1(params) {
    const url = '/ms/api/v1/sys/mach/type/list'
    return axios.get(url, params)
}
//添加设备类型
export function getMachTypeAdd_V1(params) {
    const url = '/ms/api/v1/sys/mach/type/add'
    return axios.post(url, params)
}
//编辑设备类型
export function getMachTypeEdit_V1(params) {
    const url = '/ms/api/v1/sys/mach/type/edit'
    return axios.post(url, params)
}

//设备绑定
export function getMachBind_V1(params) {
    const url = '/ms/api/v1/mach/bind'
    return axios.post(url, params)
}
//设备解绑
export function getMachUnBind_V1(params) {
    const url = '/ms/api/v1/mach/unbind/'
    return axios.post(url + params)
}
//删除设备
export function getMachRemove_V1(params) {
    const url = '/ms/api/v1/mach/del/'
    return axios.post(url + params)
}
//设备进场
export function getMachEnter_V1(params) {
    const url = '/ms/api/v1/mach/enter/'
    return axios.post(url + params)
}
// 设备退场
export function getMachOuter_V1(params) {
    const url = '/ms/api/v1/mach/outer/'
    return axios.post(url + params)
}
// 删除设备分类/类别
export function getMachTypeDel_V1(params) {
    const url = '/ms/api/v1/sys/mach/type/del/'
    return axios.post(url + params)
}
//设置设备类别启用禁用
export function getMachTypeEnable_V1(params) {
    const url = '/ms/api/v1/sys/mach/type/enable'
    return axios.get(url, params)
}
//查询设备类型列表
export function getMachTypeGetList_V1(params) {
    const url = '/ms/api/v1/sys/mach/type/tree'
    return axios.get(url, params)
}
//设备地图合作单位
export function getCorpList_V1(params) {
    const url = '/ms/api/v1/mach/option/corpList'
    return axios.get(url, params)
}
//设备地图页设备列表
export function getMachMapList_V1(params) {
    const url = '/ms/api/v1/mach/map/list'
    return axios.get(url, params)
}
//设备查询一台设备的基础信息
export function getMachInfo_V1(params) {
    const url = '/ms/api/v1/mach/anon/info'
    return axios.get(url, params)
}
//设备地图页设备列表
export function getMachList_V1(params) {
    const url = '/ms/api/v1/mach/list'
    return axios.get(url, params)
}
//设备添加设备（v1）
export function getMachAdd_V1(params) {
    const url = '/ms/api/v1/mach/add'
    return axios.post(url, params)
}
//设备编辑设备（v1）
export function getMachEdit_V1(params) {
    const url = '/ms/api/v1/mach/edit'
    return axios.post(url, params)
}
//设备编辑油箱（v1)
export function getEditMachTank_V1(params) {
    const url = '/ms/api/v1/mach/editMachTank'
    return axios.post(url, params)
}
//设备导出
export function getMachExport_V1(params) {
    const url = '/ms/api/v1/mach/export/'
    return axios.post(url + params)
}

//设备预警中心-报警次数统计（v1）
export function getMachSarnNumStatic_V1(params) {
    const url = '/ms/api/v1/mach/warn/warnNumStatic'
    return axios.get(url, params)
}

//设备云管家列表(v1)（v1）
export function getMachDeviceList_V1(params) {
    const url = '/ms/api/v1/mach/device/list'
    return axios.get(url, params)
}
//设备获取设备基本统计信息（v1）
export function getMachInfoData_V1(params) {
    const url = '/ms/api/v1/mach/ana/getMachInfoData'
    return axios.get(url, params)
}
//设备获取设备基本统计信息（v1）
export function getMachRunData_V1(params) {
    const url = '/ms/api/v1/mach/ana/getMachRunData'
    return axios.get(url, params)
}

//获取通过设备类型分析数据列表(v1)
export function getMonthDataListByType_V1(params) {
    const url = '/ms/api/v1/mach/ana/getMonthDataListByType'
    return axios.post(url, params)
}
//获取通过持有单位分析数据列表(v1)
export function getMonthDataListByCorp_V1(params) {
    const url = '/ms/api/v1/mach/ana/getMonthDataListByCorp'
    return axios.post(url, params)
}

//设备数据-列表(v1)
export function getMachDataList_V1(params) {
    const url = '/ms/api/v1/mach/data/list'
    return axios.get(url, params)
}
//设备数据-单台设备-gps轨迹(v1)
export function getMachGPSLog_V1(params) {
    const url = '/ms/api/v1/mach/gps/log'
    return axios.get(url, params)
}
//设备数据-单台设备-工时(v1)
export function getMachWorkData_V1(params) {
    const url = '/ms/api/v1/mach/work/data'
    return axios.get(url, params)
}
//设备数据-单台设备-指数(v1)
export function getMachRadarData_V1(params) {
    const url = '/ms/api/v1/mach/radar/data'
    return axios.get(url, params)
}
//设备数据-单台设备-指数(v1)
export function getMachOilData_V1(params) {
    const url = '/ms/api/v1/mach/oil/data'
    return axios.get(url, params)
}
//设备数据-设备日报数据列表(v1)
export function getDayReportDataList_V1(params) {
    const url = '/ms/api/v1/mach/dayReport/data/list'
    return axios.get(url, params)
}
//设备数据-设备日报数据(v1)
export function getDayReportDataDetail_V1(params) {
    const url = '/ms/api/v1/mach/dayReport/data/detail'
    return axios.get(url, params)
}
//设备数据-导出设备日报数据(v1)
export function getDayReportDataExport_V1(params) {
    const url = '/ms/api/v1/mach/dayReport/data/export'
    return axios.post(url, params)
}
//设备数据-设备周报数据列表(v1)
export function getWeekReportDataList_V1(params) {
    const url = '/ms/api/v1/mach/weekReport/data/list'
    return axios.get(url, params)
}
//设备数据-设备周报数据(v1)
export function getWeekReportDataDetail_V1(params) {
    const url = '/ms/api/v1/mach/weekReport/data/detail'
    return axios.get(url, params)
}
//设备数据-导出设备周报数据(v1)
export function getWeekReportDataExport_V1(params) {
    const url = '/ms/api/v1/mach/weekReport/data/export'
    return axios.post(url, params)
}
//设备数据-设备月报数据列表(v1)
export function getMonthReportDataList_V1(params) {
    const url = '/ms/api/v1/mach/monthReport/data/list'
    return axios.get(url, params)
}
//设备数据-设备月报数据(v1)
export function getMonthReportDataDetail_V1(params) {
    const url = '/ms/api/v1/mach/monthReport/data/detail'
    return axios.get(url, params)
}
//设备数据-导出设备月报数据(v1)
export function getMonthReportDataExport_V1(params) {
    const url = '/ms/api/v1/mach/monthReport/data/export'
    return axios.post(url, params)
}
//预警中心-设备报警记录列表（v1）
export function getMachRecordList_V1(params) {
    const url = '/ms/api/v1/mach/warn/record/list'
    return axios.get(url, params)
}
//预警中心-查看报警处理详情(v1)
export function getMachRecordDetail_V1(params) {
    const url = '/ms/api/v1/mach/warn/record/detail'
    return axios.get(url, params)
}
//预警中心-处理报警(v1)
export function getMachRecordHandle_V1(params) {
    const url = '/ms/api/v1/mach/warn/record/handle'
    return axios.post(url, params)
}
//预警中心-批量处理报警(v1)
export function getMachRecordBatchHandle_V1(params) {
    const url = '/ms/api/v1/mach/warn/record/batchHandle'
    return axios.post(url, params)
}
//预警中心-设备报警设置列表(v1)
export function getMachRulelist_V1(params) {
    const url = '/ms/api/v1/mach/warn/rule/list'
    return axios.get(url, params)
}
//预警中心-新增报警类型(v1)
export function getMachRuleAdd_V1(params) {
    const url = '/ms/api/v1/mach/warn/rule/add'
    return axios.post(url, params)
}
//预警中心-编辑报警类型(v1)
export function getMachRuleEdit_V1(params) {
    const url = '/ms/api/v1/mach/warn/rule/edit'
    return axios.post(url, params)
}

//预警中心-启用禁用设备报警(v1)
export function getMachRuleEnable_V1(params) {
    const url = '/ms/api/v1/mach/warn/rule/enable'
    return axios.post(url, params)
}
//预警中心-删除设备报警(v1)
export function getMachRuleDel_V1(params) {
    const url = '/ms/api/v1/mach/warn/rule/del/'
    return axios.post(url + params)
}
//预警中心-设置报警时间(v1)
export function getMachRuleSetTime_V1(params) {
    const url = '/ms/api/v1/mach/warn/rule/setTime'
    return axios.post(url, params)
}
//预警中心-报警对象列表(v1)
export function getMachObjectlist_V1(params) {
    const url = '/ms/api/v1/mach/warn/object/list'
    return axios.get(url, params)
}
//预警中心-查询可添加的设备(v1)
export function getMachObjectAddList_V1(params) {
    const url = '/ms/api/v1/mach/warn/getMachList'
    return axios.get(url, params)
}
//预警中心-添加报警对象(v1)
export function getMachObjectAdd_V1(params) {
    const url = '/ms/api/v1/mach/warn/object/add'
    return axios.post(url, params)
}
//预警中心-查询接收报警的用户(v1)
export function getMachUseList_V1(params) {
    const url = '/ms/api/v1/mach/warn/user/list'
    return axios.get(url, params)
}
//预警中心-设置接收报警的用户(v1)
export function getMachUseAdd_V1(params) {
    const url = '/ms/api/v1/mach/warn/user/add'
    return axios.post(url, params)
}
//获取设备标定加油量详情（v1）
export function getMachOilAdd_V1(params) {
    const url = '/ms/api/v1/mach/getOilAdd'
    return axios.get(url, params)
}
//标定加油量（v1）
export function setOilAdd_V1(params) {
    const url = '/ms/api/v1/mach/setOilAdd'
    return axios.post(url, params)
}
//obd设备-gps轨迹(v1)
export function getOBDGPSLogList_V1(params) {
    const url = '/ms/api/v1/mach/obd/gps/log'
    return axios.get(url, params)
}
//获取obd设备参数(v1)
export function getOBDGPSParamList_V1(params) {
    const url = '/ms/api/v1/mach/obd/param/list'
    return axios.get(url, params)
}

//获取obd单台设备-放线里程(OBD)(v1)
export function getOBDMileDate_V1(params) {
    const url = '/ms/api/v1/mach/obd/mile/data'
    return axios.get(url, params)
}
//获取obd单台设备-油耗（OBD）(v1)
export function getOBDOilDate_V1(params) {
    const url = '/ms/api/v1/mach/obd/oil/data'
    return axios.get(url, params)
}



//电力设备日报统计值
export function getMachDayReportStat_V2(params) {
    const url = '/ms/api/v2/mach/report/stat'
    return axios.get(url, params)
}
//电力设备日报
export function getMachDayReport_V2(params) {
    const url = '/ms/api/v2/mach/dayReport'
    return axios.get(url, params)
}
//导出报表
export function getOBDReportExport_V2(params) {
    const url = '/ms/api/v2/mach/report/export'
    return axios.post(url, params)
}
//电力设备通用报表
export function getMachReport_V2(params) {
    const url = '/ms/api/v2/mach/report'
    return axios.get(url, params)
}
//导出普通设备报表
export function getMachCommonReportExport_V2(params) {
    const url = '/ms/api/v2/mach/common/report/export'
    return axios.post(url, params)
}
//单台设备-gps轨迹分段(python服务)
export function getMachGPSTransport(params) {
    const url = '/ms/api/py/mach/gps/transport'
    return axios.get(url, params)
}